package com.zxy.barometer.message.response;

import com.zxy.barometer.common.utils.WeatherConditionUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @author zxy
 */
@Data
@ApiModel(value = "天气信息响应model")
public class DomesticSectionWeatherResp implements Serializable {
    @ApiModelProperty(value = "时间")
    private String realTime;
    @ApiModelProperty(value = "最高气温")
    private String maxTemp;
    @ApiModelProperty(value = "最低气温")
    private String minTemp;
    @ApiModelProperty(value = "白天图标")
    private String dayImg;
    @ApiModelProperty(value = "晚上图标")
    private String nightImg;
    @ApiModelProperty(value = "白天天气情况")
    private String dayWeatherCondition;
    @ApiModelProperty(value = "晚上天气情况")
    private String nightWeatherCondition;

    public String getDayWeatherCondition() {
        this.dayWeatherCondition = WeatherConditionUtil.resultWeatherConditionMap.get(dayImg) != null ? WeatherConditionUtil.resultWeatherConditionMap.get(dayImg) : "No Data";
        return dayWeatherCondition;
    }

    public String getNightWeatherCondition() {
        this.nightWeatherCondition = WeatherConditionUtil.resultWeatherConditionMap.get(nightImg) != null ? WeatherConditionUtil.resultWeatherConditionMap.get(nightImg) : "No Data";
        return nightWeatherCondition;
    }
}
